package com.sneakxy.cloudbase.platform.utils;

import org.springframework.beans.factory.FactoryBean;

import com.sneakxy.cloudbase.platform.bean.FtpConfig;

public class FtpClientFactory implements FactoryBean<FtpClient> {

	private FtpConfig config;
	
	public FtpClientFactory(FtpConfig config) {
		this.config = config;
	}
	
	@Override
	public FtpClient getObject() {
		return new FtpClient(config);
	}

	@Override
	public Class<?> getObjectType() {
		return FtpClient.class;
	}

	public FtpConfig getConfig() {
		return config;
	}

	public void setConfig(FtpConfig config) {
		this.config = config;
	}

}
